<?php
function Is_sale($ID){
    $sql="SELECT * FROM product_sale WHERE PS_ProductID=".$ID;
    $exist=mysql_query($sql);
    if(mysql_num_rows($exist)==1)
       return true;
    else
       return false;
}
function SQL_Add_sale($ID){
    $sql="INSERT INTO product_sale (PS_ProductID) VALUES (".$ID.")";
    mysql_query($sql);
    return true;
}
function SQL_Remove_sale($ID){
    $sql="DELETE FROM product_sale WHERE PS_ProductID=".$ID;
    mysql_query($sql);
    return true;
}
?>